use axum::http::StatusCode;
use axum::response::IntoResponse;
use sq_global::get_tushare_idx;

pub async fn chg_token() -> impl IntoResponse {
    tracing::info!("start change token");
    let mut guard = get_tushare_idx().write().await;
    let x = *guard;
    let new = x + 1;
    *guard = new;
    tracing::info!("new index {}", new);
    (StatusCode::OK, "操作成功！")
}
